Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinitime Simple Weather Service #319

Merged
merged 25 commits into from
Dec 27, 2023
Merged

Infinitime Simple Weather Service #319

merged 25 commits into from
Dec 27, 2023

Conversation

jmlich
Copy link
Contributor

@jmlich jmlich commented Dec 12, 2023

This is was created in cooperation with @JF002 in scope of #308. (Closes #308)
Documentation of the service and reasons are described in InfiniTime pull request.
InfiniTimeOrg/InfiniTime#1924

I have update the osm weather in order to provide icon and temperature in qreal, because it converted from kelvins which adds unwanted error to the value (for example 274.9 kelvins ~ 274 - 273 = 1 deg, but it should be 274.9 - 273.15 = 1.75 ~ 2 deg). The weather icon is displayed in cityselection dialog.

jmlich and others added 22 commits November 2, 2023 19:33
 - the conversion of the city name was generating invalid characters (16bits? utf8?). Now, it generated plain 8-bit ASCII.
 - a typo around the temperature conversion (237.15 -> 273.15)
…ication from InfiniTime : new service UUID, remove the location string from the forecast and update the weather condition icons.
…nstead of uint8_t to store the temperature).
@JF002
Copy link
Contributor

JF002 commented Dec 24, 2023

We merged the new Simple Weather Service in InfiniTime. I did most of my tests using this PR in Amazfish, so I guess it's pretty safe to merge it ;-)
Thanks again a lot to @jmlich for their help on this topic!

@jmlich jmlich changed the title WIP: Infinitime Simple Weather Service Infinitime Simple Weather Service Dec 24, 2023
@jmlich
Copy link
Contributor Author

jmlich commented Dec 24, 2023

There is a few things to consider

  • I have modified the openweather api to get temperature in float, not int. The floating point is better to keep precision while converting to Fahrenheit scale. I was looking into code and it should work for other devices, but I will be happier if you can check if it really works.
  • Both weather services are still there. New InfiniTime just doesn't advertise the other GATT service, so it is created just right instance of Weather Class. For Old InfiniTime is it other way around.
  • I did some changes in weather selection page UI. It shows the icon now. Does it look fine on SailfishOS?

@jmlich
Copy link
Contributor Author

jmlich commented Dec 24, 2023

I should probably rename the service to pinetimesimpleweatherservice to highlight that this is pinetime specific.

@piggz
Copy link
Owner

piggz commented Dec 24, 2023

Good idea

@piggz piggz merged commit 094fd08 into piggz:master Dec 27, 2023
3 checks passed
@jmlich jmlich deleted the weather branch December 28, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weather Service rework
3 participants